package cn.yshujia.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * @author YShuJia
 * @create 2024/4/23
 * @description 实体
 */

@Data
@TableName ("t_website")
@Schema (name = "Website", description = "友情链接信息")
public class Website implements Serializable {
	@Serial
	private static final long serialVersionUID = 1L;
	
	@Schema (description = "主键")
	@TableId (value = "id", type = IdType.AUTO)
	private Long id;
	
	@Schema (description = "用户ID")
	@TableField ("user_id")
	private Long userId;
	
	@Schema (description = "标签ID")
	@TableField ("label_id")
	private Long labelId;
	
	@Schema (description = "网站标题")
	@TableField ("title")
	private String title;
	
	@Schema (description = "头像")
	@TableField ("avatar")
	private String avatar;
	
	@Schema (description = "网站简介")
	@TableField ("introduction")
	private String introduction;
	
	@Schema (description = "链接")
	@TableField ("url")
	private String url;
	
	@Schema (description = "封面")
	@TableField ("cover")
	private String cover;
	
	@Schema (description = "创建时间")
	@TableField (value = "create_time", fill = FieldFill.INSERT)
	@JsonFormat (pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date createTime;
	
	@Schema (description = "1推荐，0不推荐")
	@TableField ("is_recommend")
	private Boolean isRecommend;
	
	@Schema (description = "是否启用 1 启用 0 停用")
	@TableField ("`status`")
	private Boolean status;
}